package com.tbm.console.proj.controller;

import com.tbm.console.base.controller.BaseController;
import com.tbm.console.util.JurisdictionUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class FrameController extends BaseController {

    @RequestMapping(value = "/uploadSolution/{id}")
    public ModelAndView uploadSolution(@PathVariable("id") Integer id){
        ModelAndView mv = this.getModelAndView();
        String viewName = "login";
        if(JurisdictionUtil.isValid()){
            viewName = "frame/uploadSolution";
            mv.addObject("id",id);
        }
        mv.setViewName(viewName);
        return mv;
    }
}
